package com.zhaoziqian.service;

import com.zhaoziqian.model.SDKResponse;
import org.hyperledger.fabric.sdk.Channel;
import org.hyperledger.fabric.sdk.exception.CryptoException;
import org.hyperledger.fabric.sdk.exception.InvalidArgumentException;

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;

/**
 * Created with fabric-cli
 * 作者： zhaoziqian
 * 时间： 2018/5/28  下午10:39
 * 功能：
 */
public interface Network {

    Channel createChannel(String ordererId, String ordererOrg, String org, String channelName) throws Exception;

    Channel joinChannel(String ordererOrg, String ordererId, String peerId, String org, String channelName) throws Exception;

    SDKResponse installChainCode(String ordererOrg, String ordererId, String peerId, String org, String channelName, String chainCodePath, String chaincodeVersion, String chaincodeId) throws Exception;

    SDKResponse instantiateChainCode(String ordererOrg, String ordererId, String peerId, String org, String channelName, String chainCodePath, String chaincodeVersion, String chaincodeId, String[] args) throws Exception;
}
